<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Index</title>
	<script src="jquery-3.2.1.js"></script>
</head>
<body>
<div id="app">csdcsd</div>
<button type="button" onclick="getdata()">GET</button>
<button type="button" onclick="putdata()">PUT</button>
<button type="button" onclick="CORS()">CORS</button>
<script>
	function getdata() {
		$.get("http://localhost:8080/user/getAll", function (res) {
			$("#app").html("<p>"+ res + "</p>")
		});
	}

	function putdata() {
		$.ajax({
			type: 'put',
			url: 'http://localhost:8080/user/doput',
			success: function (res) {
				$("#app").html(res);
			}
		})
	}

	function CORS() {
			$.ajax({
				type: 'get',
				url: 'http://localhost:8080/hello',
				success: function (res) {
					$("#app").html(res);
				}
			})
	}
</script>
</body>
</html>